<?php
include("include/cfg_login.php");
include("include/functions.php");
include("../includes/limba/ro/limba.php");
?>

<html>
	<head>
		<link href="css/style.css" rel="stylesheet">
		<link href="../css/start/jquery-ui-1.10.4.custom.css" rel="stylesheet">
	</head>
	<body>
		<div id="adminMenu">
			<?php include("include/menu.php"); ?>
		</div>
		<div id="content">
			<div id="contentWrap">
				<h2> Cutremur de 5.5 grade in Zona seismica Vrancea,Vrancea la 06.10.2013, 01:37:21 (UTC)</h2>
				<div id="legenda">
				<b>Legenda:</b><br />
				<? for($i=1;$i<13;$i++):?>
				<div  title="<? echo $_['raspuns-'.$i]; ?>" class="legendaCulori color<? echo $i; ?>"><? echo $i; ?></div>
				<? endfor; ?>
				<div style="clear:both"></div>
				</div>
				<div id="map-judete"></div>
				<div id="dialogEveniment" title="Comentariu eveniment"></div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> 
	<script src="../js/jquery-1.10.2.js"></script>
	<script src="../js/jquery-ui-1.10.4.custom.js"></script>
	<script type='text/javascript' src='https://www.google.com/jsapi'></script>
	<script>
	google.load('visualization', '1', { 'packages': ['geochart'] });
    google.setOnLoadCallback(drawMap);

    function drawMap() {
		var data = google.visualization.arrayToDataTable([
		
		['Country' ,'Intensitate'],
			<?php
			$res = mysql_query("select * from feedback");
			while($row = mysql_fetch_array($res)):
			?>
		['<? echo $row['adresa']; ?>', <? echo $row['intensitate']; ?>],
		<? endwhile; ?>
		[' ', 1]
	]);

        var options = {width: 900, height: 600};
		//options['colorAxis'] = {minValue: 1, maxValue: 12, colors: ['#4bb5f3', '#FADC41', '#c44949', '#d74a12', '#0e9a0e', '#55c2ac', '#7c4b91', '#fadc41', '#0d6cca', '#7c4897']}
		options['colorAxis'] = {values: [1,2,3,4,5,6,7,8,9,10,11,12]}
        options['region'] = 'RO';
        options['resolution'] = 'provinces';
        options['colors'] = ['#2AE212', '#11E347', '#11E595', '#11E6E5', '#119AE8', '#114BEA', '#2610EB', '#7710ED', '#CA10EF', '#F010C2','#F21070','#F40F1C'];
		
		options['legend'] = 'none';
        
		var container = document.getElementById('map-judete');
        var geochart = new google.visualization.GeoChart(container);
        geochart.draw(data, options);
    };
		
	</script>
</html>